package com.aibaixun.system.service;

import com.aibaixun.common.core.domain.R;
import com.aibaixun.system.domain.PostureDevice;
import com.aibaixun.system.domain.dto.BindDeviceDto;
import com.aibaixun.system.domain.dto.PostureDeviceDto;
import com.aibaixun.system.domain.dto.PostureDevicePageDto;
import com.aibaixun.system.domain.vo.ExportDeviceVo;
import com.aibaixun.system.domain.vo.PostureDeviceVo;
import com.aibaixun.system.domain.vo.QueryDeviceTreeVo;
import com.baomidou.mybatisplus.extension.plugins.pagination.Page;
import com.baomidou.mybatisplus.extension.service.IService;

import java.util.List;
import java.util.Map;

/**
 * 架式设备 业务层
 *
 * @author zhangyh
 */
public interface PostureDeviceService extends IService<PostureDevice> {

    /**
     * 分页
     * @param page
     * @param pageDto
     * @return
     */
    R<Page<PostureDevice>> getPage(Page page, PostureDevicePageDto pageDto);

    /**
     * 新增
     * @param dto
     * @return
     */
    R add(PostureDeviceDto dto);

    /**
     * 编辑
     * @param dto
     * @return
     */
    R update(PostureDeviceDto dto);

    /**
     * 删除
     * @param deviceId
     * @return
     */
    R delete(Long deviceId);

    /**
     * 查询全部
     * @param dto
     * @return
     */
    R<List<PostureDeviceVo>> getList(PostureDeviceDto dto);

    /**
     * 机柜容量
     * @return
     */
    R getCabinetSpace();

    void addDevice(List<PostureDevice> saveList);

    List<PostureDevice> queryByRoomId(String cabinetId);

    List<QueryDeviceTreeVo> queryDeviceList();

    boolean checkDeviceUe(String ueId);

    boolean updateDeviceById(BindDeviceDto dto);

    R saveDeviceList(List<PostureDevice> postureDeviceList);

    List<ExportDeviceVo> exportDevice();

    List<PostureDevice> queryDeviceListByCabinet(List<String> addressNameList);

    void resetUeId();

}
